package com.itheima.reggie.mappers;

import com.itheima.reggie.entity.DishFlavor;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface DishFlavorMapper {
    void save(@Param("flavors") List<DishFlavor> flavors);

    @Select("select * from dish_flavor where dish_id=#{dishId}")
    List<DishFlavor> findByDishId(Long dishId);

    /*@Delete("delete from dish_flavor where dish_id=#{dishId}")
    void delete(Long dishId);*/

    void delete(@Param("dishIds") Long[] dishIds);
}
